package com.ruoyi.domain;

import com.fasterxml.jackson.annotation.JsonFormat;
import com.ruoyi.common.core.annotation.Excel;
import com.ruoyi.common.core.web.domain.BaseEntity;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;

import java.math.BigDecimal;
import java.util.Date;
import java.util.List;

/**
 * 手机端订单对象 mobil_order
 *
 * @author ruoyi
 * @date 2025-01-20
 */
public class MobilOrder extends BaseEntity {
    private static final long serialVersionUID = 1L;

    /** 订单id（主键） */
    private Integer orderId;

    /** 订单号（唯一标识订单） */
    @Excel(name = "订单号")
    private String orderNumber;

    /** 用户ID */
    @Excel(name = "用户ID")
    private Integer userId;

    /** 车辆ID */
    @Excel(name = "车辆ID")
    private Integer vehicleId;

    /** 门店ID */
    @Excel(name = "门店ID")
    private Integer storeId;

    /** 订单状态（0 = 待支付，1 = 进行中，2 = 已完成，3 = 已取消，4 = 已退款） */
    @Excel(name = "订单状态", readConverterExp = "0=待支付,1=进行中,2=已完成,3=已取消,4=已退款")
    private Integer orderStatus;

    /** 维修方式（如 "到店维修" "上门取车"） */
    @Excel(name = "维修方式")
    private String repairMode;

    /** 预约时间 */
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @Excel(name = "预约时间", width = 30, dateFormat = "yyyy-MM-dd HH:mm:ss")
    private Date appointTime;

    /** 下单时间 */
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @Excel(name = "下单时间", width = 30, dateFormat = "yyyy-MM-dd HH:mm:ss")
    private Date createTime;

    /** 订单备注 */
    @Excel(name = "订单备注")
    private String remark;

    /** 核销码 */
    @Excel(name = "核销码")
    private String verificationCode;

    /** 实付金额 */
    @Excel(name = "实付金额")
    private BigDecimal payAmount;

    /** 更新时间 */
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @Excel(name = "更新时间", width = 30, dateFormat = "yyyy-MM-dd HH:mm:ss")
    private Date updateTime;

    /** 服务类别 */
    @Excel(name = "服务类别")
    private Integer typeId;

    /** 门店信息（关联查询） */
    private MobilMerchant storeInfo;

    /** 车辆信息（关联查询） */
    private MobilCarInfo vehicleInfo;

    /** 订单详情列表（关联查询） */
    private List<MobilOrderDetails> orderDetails;

    /** 优惠券ID */
    private Integer couponId;

    /** 优惠金额 */
    private BigDecimal discountAmount;

    public void setOrderId(Integer orderId) {
        this.orderId = orderId;
    }

    public Integer getOrderId() {
        return orderId;
    }

    public void setOrderNumber(String orderNumber) {
        this.orderNumber = orderNumber;
    }

    public String getOrderNumber() {
        return orderNumber;
    }

    public void setUserId(Integer userId) {
        this.userId = userId;
    }

    public Integer getUserId() {
        return userId;
    }

    public void setVehicleId(Integer vehicleId) {
        this.vehicleId = vehicleId;
    }

    public Integer getVehicleId() {
        return vehicleId;
    }

    public void setStoreId(Integer storeId) {
        this.storeId = storeId;
    }

    public Integer getStoreId() {
        return storeId;
    }

    public void setOrderStatus(Integer orderStatus) {
        this.orderStatus = orderStatus;
    }

    public Integer getOrderStatus() {
        return orderStatus;
    }

    public void setRepairMode(String repairMode) {
        this.repairMode = repairMode;
    }

    public String getRepairMode() {
        return repairMode;
    }

    public void setAppointTime(Date appointTime) {
        this.appointTime = appointTime;
    }

    public Date getAppointTime() {
        return appointTime;
    }

    public void setCreateTime(Date createTime) {
        this.createTime = createTime;
    }

    public Date getCreateTime() {
        return createTime;
    }

    public void setRemark(String remark) {
        this.remark = remark;
    }

    public String getRemark() {
        return remark;
    }

    public void setVerificationCode(String verificationCode) {
        this.verificationCode = verificationCode;
    }

    public String getVerificationCode() {
        return verificationCode;
    }

    public void setPayAmount(BigDecimal payAmount) {
        this.payAmount = payAmount;
    }

    public BigDecimal getPayAmount() {
        return payAmount;
    }

    public void setUpdateTime(Date updateTime) {
        this.updateTime = updateTime;
    }

    public Date getUpdateTime() {
        return updateTime;
    }

    public void setTypeId(Integer typeId) {
        this.typeId = typeId;
    }

    public Integer getTypeId() {
        return typeId;
    }

    public MobilMerchant getStoreInfo() {
        return storeInfo;
    }

    public void setStoreInfo(MobilMerchant storeInfo) {
        this.storeInfo = storeInfo;
    }

    public MobilCarInfo getVehicleInfo() {
        return vehicleInfo;
    }

    public void setVehicleInfo(MobilCarInfo vehicleInfo) {
        this.vehicleInfo = vehicleInfo;
    }

    public List<MobilOrderDetails> getOrderDetails() {
        return orderDetails;
    }

    public void setOrderDetails(List<MobilOrderDetails> orderDetails) {
        this.orderDetails = orderDetails;
    }

    public Integer getCouponId() {
        return couponId;
    }

    public void setCouponId(Integer couponId) {
        this.couponId = couponId;
    }

    public BigDecimal getDiscountAmount() {
        return discountAmount;
    }

    public void setDiscountAmount(BigDecimal discountAmount) {
        this.discountAmount = discountAmount;
    }

    @Override
    public String toString() {
        return new ToStringBuilder(this, ToStringStyle.MULTI_LINE_STYLE)
                .append("orderId", getOrderId())
                .append("orderNumber", getOrderNumber())
                .append("userId", getUserId())
                .append("vehicleId", getVehicleId())
                .append("storeId", getStoreId())
                .append("orderStatus", getOrderStatus())
                .append("repairMode", getRepairMode())
                .append("appointTime", getAppointTime())
                .append("createTime", getCreateTime())
                .append("remark", getRemark())
                .append("verificationCode", getVerificationCode())
                .append("payAmount", getPayAmount())
                .append("updateTime", getUpdateTime())
                .append("typeId", getTypeId())
                .toString();
    }
}

